# $Id$
# Maintainer:  Ionut Biru <ibiru@archlinux.org>
# Contributor: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Sergej Chodarev <sergejx@centrum.sk>
# Contributor: zhuqin <zhuqin83@gmail.com>

pkgname=gedit-plugins
pkgver=3.22.0+71+g926f06c
pkgrel=1
pkgdesc="Collection of plugins for the gedit Text Editor"
url="https://wiki.gnome.org/Apps/Gedit/ShippedPlugins"
arch=(x86_64 i686)
license=(GPL)
depends=(gedit python-dbus python-cairo)
makedepends=(intltool vte3 libgit2-glib itstool gucharmap gobject-introspection vala yelp-tools git)
optdepends=('gucharmap: for charmap plugin'
            'vte3: for embedded terminal'
            'libgit2-glib: for git plugin')
_commit=926f06c4ce5ac71baa401f2f4211096d2a751a8d  # master
source=("git+https://git.gnome.org/browse/gedit-plugins#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --disable-schemas-compile
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR=$pkgdir install
}

# vim:set ts=2 sw=2 et:
